home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
RTPC10
/
MOUSE_D.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-11-20
|
3KB
|
80 lines
{
┌────────┬──────────────────────────────────────────────────────┐
│Name │ MOUSE_D.PAS │
├────────┼──────────────────────────────────────────────────────┤
│Use │ Example program that uses the MOUSE.TPU. │
├────────┼──────────────────────────────────────────────────────┤
│By │ Rafe Aldridge - (C) Copyright 1993 │
└────────┴──────────────────────────────────────────────────────┘
┌───────────────────────────────────────────────────────────────┐
│ Rafe's TP Collection is SHAREWARE │
├───────────────────────────────────────────────────────────────┤
│ │
│ If you find any part of Rafe's TP Collection usefull then │
│ please become a registered user by sending 10 Pounds Sterling │
│ to the address below. In return you will recieve the LATEST │
│ FULL source code to ALL the units as well anything new. │
│ │
│ Please feel free to write with suggestions, ideas or money to │
│ Rafe Aldridge, │
│ Street Farm, │
│ Dereham Road, │
│ Garvestone, │
│ Norfolk. │
│ NR9 4QT │
│ ENGLAND │
│ │
└───────────────────────────────────────────────────────────────┘
}
uses Crt,Mouse;
var
X,Y : Word;
S : String;
begin
Clrscr;
if not Mreset then
begin
Writeln('No Mouse Driver!');
Halt(0);
end;
SetTPointer ($77FF,$7700,False);
SetPointer (true);
SetPos (5,5);
S:='Move mouse about, then click on this to continue.';
Writeln (s);
repeat
begin
GetPos (X,Y);
GotoXY (2,2);
Writeln ('X: ',X,' Y: ',Y,' ');
end; { repeat }
until (IsIt(0,0,Length(S)*8,0)) and (GetButton>0);
Delay (500);
Writeln;
Writeln ('New Style Pointer! Press a button to continue');
SetTPointer ($7777,$FFFF,False);
repeat until GetButton>0;
Delay (500);
Writeln;
Writeln ('I have now set a limit to where you can go!');
Writeln ('Press a button to continue');
TextBackground (1);
Window (20,20,70,24);
ClrScr;
SetLimits (152,152,552,186);
repeat until GetButton>0;
Delay (500);
Writeln;
Writeln (' Now you can go anywhere BUT this box!');
Writeln (' Press a button to continue');
SetLimits (0,0,632,192);
SetNoLimits (152,152,552,186);
repeat until GetButton>0;
Writeln;
TextBackground (0);
Window (1,1,80,25);
ClrScr;
end.